<div class="container">

	<?php echo $this->session->flash(); ?>
			
	<div class="panel panel-primary">
		<div class="panel-heading">
			<h3 class="panel-title">Add New Product</h3>
		</div>
		<div class="panel-body">
			
			<?php echo $this->Form->create(null, array('enctype'=>'multipart/form-data', 'url' => array('controller' => 'product', 'action' => 'add'))); ?>
		
				<table>		
					<tr>
						<td style="width:30%; border-bottom:none !important;">
							<div class="panel panel-primary">
							  <div class="panel-body">				   	
									
									<?php echo $this->Form->input('product_name', array('placeholder' => 'Product name', 'required' => true)); ?>
									
									<div class="input select">
										<label for="ProductProductName">Category</label><br>
										<select name="data[Product][category_id]" id="ProductCategoryId">
											
											<?php foreach($category as $cate): ?>
												<option value="<?php echo $cate['Category']['id']; ?>"><?php echo $cate['Category']['category_name']; ?></option>
											<?php endforeach; ?>
											
										</select>
									</div>
						
									<?php echo $this->Form->input('made_in', array('placeholder' => 'Made in', 'required' => true)); ?>
						
									<?php echo $this->Form->input('price', array('placeholder' => 'Product price', 'required' => true)); ?>
									<?php echo $this->Form->input('sale_off', array('placeholder' => 'Sale Off Price', 'required' => true)); ?>	
									
									<?php
										
										echo $this->Form->input('special', array('label' => false,
										    'options' => array(0 => 'Normal ', 1 => 'Special ')
										));
						 
									?>					
									
							  </div>
							</div>	
						</td>
						
						<td style="border-bottom:none !important;">
							<div class="panel panel-primary">
							  <div class="panel-body">				   	
									
									<?php echo $this->Form->input('description', array('placeholder' => 'Product description', 'required' => true)); ?>	
						
									<?php echo $this->Form->input('detail', array('placeholder' => 'Product detail', 'required' => true)); ?>														
									
									<?php echo $this->Form->input('sub_img1', array('type' => 'file', 'label' => 'Product Image 1', 'required' => true)); ?>
									<?php echo $this->Form->input('sub_img2', array('type' => 'file', 'label' => 'Product Image 2', 'required' => true)); ?>
									<?php echo $this->Form->input('sub_img3', array('type' => 'file', 'label' => 'Product Image 3', 'required' => true)); ?>
									
									<a href="<?php echo $this->webroot; ?>product"><button class="btn btn-danger" type="button">Back</button></a>
									<button class="btn btn-primary" type="submit">Add</button>	
							  </div>
							</div>	
						</td>
						
					</tr>
					<tr></tr>
				</table>
			<?php echo $this->Form->end(); ?>
	
		</div>
    </div>
	
</div>